package NO01;

/*
 * 懒汉模式非线程安全-02
 * 懒汉模式线程安全-03-直接在getInstance方法前面加上synchronized即可
 */
public class Singleton02 {
	private Singleton02(){}
	
	private static Singleton02 instance;
	
	public static Singleton02 getInstance(){
		if(instance == null){
			return new Singleton02();
		}
		return instance;
	}
	
}
